package com.ygqh.baby.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ygqh.baby.ao.DataStatus;
import com.ygqh.baby.ao.ProductStatus;
import com.ygqh.baby.ao.PromotionType;

import java.math.BigDecimal;
import java.util.Date;

public class YgShoppingCarModel implements Cloneable {
    private Long id;

    private Long userId;

    private Long skuId;

    private Long supplierId;

    private Long quantity;
    // 用于校验库存
    private Long amount;

    private PromotionType salesType;

    private BigDecimal salesPrice;

    private BigDecimal promotionPrice;

    private Boolean isCheck;

    private Long stockNum;

    private Long productId;

    private BigDecimal newCustomPrice;

    private String unitName;

    private String productName;

    private String shortName;

    private String sizeName;

    private String imagePath;

    private Date createTime;

    private String skuCode;

    private DataStatus skuStatus;

    private ProductStatus saleStatus;

    private Date preSaleDate;

    private Long packId;

    private String packTitle;

    private BigDecimal packPrice;
    private BigDecimal packVipPrice;

    private BigDecimal vipPrice;

    private Long productAmount;

    private Boolean cumulative;
    private Boolean useCoupon;

    private Boolean isSpecial;

    private BigDecimal realSalesPrice;

    private BigDecimal shareRate;
    private BigDecimal foreverRate;


    private BigDecimal distributionPrice;

    private BigDecimal packDistributionPrice;

    private Long brandId;

    //===================

    private String productCode;

    public String getProductCode() {
        return productCode;
    }

    public void setProductCode(String productCode) {
        this.productCode = productCode;
    }

    public BigDecimal getDistributionPrice() {
        return distributionPrice;
    }

    public void setDistributionPrice(BigDecimal distributionPrice) {
        this.distributionPrice = distributionPrice;
    }

    public BigDecimal getPackDistributionPrice() {
        return packDistributionPrice;
    }

    public void setPackDistributionPrice(BigDecimal packDistributionPrice) {
        this.packDistributionPrice = packDistributionPrice;
    }

    public Boolean getCumulative() {
        return cumulative;
    }

    public void setCumulative(Boolean cumulative) {
        this.cumulative = cumulative;
    }

    public Boolean getUseCoupon() {
        return useCoupon;
    }

    public void setUseCoupon(Boolean useCoupon) {
        this.useCoupon = useCoupon;
    }

    public BigDecimal getShareRate() {
        return shareRate;
    }

    public void setShareRate(BigDecimal shareRate) {
        this.shareRate = shareRate;
    }

    public BigDecimal getForeverRate() {
        return foreverRate;
    }

    public void setForeverRate(BigDecimal foreverRate) {
        this.foreverRate = foreverRate;
    }

    public BigDecimal getRealSalesPrice() {
        return realSalesPrice;
    }

    public void setRealSalesPrice(BigDecimal realSalesPrice) {
        this.realSalesPrice = realSalesPrice;
    }

    public BigDecimal getVipPrice() {
        return vipPrice;
    }

    public void setVipPrice(BigDecimal vipPrice) {
        this.vipPrice = vipPrice;
    }

    public Boolean getIsSpecial() {
        return isSpecial;
    }

    public void setIsSpecial(Boolean isSpecial) {
        this.isSpecial = isSpecial;
    }

    public DataStatus getSkuStatus() {
        return skuStatus;
    }

    public void setSkuStatus(DataStatus skuStatus) {
        this.skuStatus = skuStatus;
    }

    public Long getProductAmount() {
        return productAmount;
    }

    public void setProductAmount(Long productAmount) {
        this.productAmount = productAmount;
    }

    public Long getPackId() {
        return packId;
    }

    public void setPackId(Long packId) {
        this.packId = packId;
    }

    public String getPackTitle() {
        return packTitle;
    }

    public void setPackTitle(String packTitle) {
        this.packTitle = packTitle;
    }

    public BigDecimal getPackPrice() {
        return packPrice;
    }

    public void setPackPrice(BigDecimal packPrice) {
        this.packPrice = packPrice;
    }

    public BigDecimal getNewCustomPrice() {
        return newCustomPrice;
    }

    public void setNewCustomPrice(BigDecimal newCustomPrice) {
        this.newCustomPrice = newCustomPrice;
    }

    public Long getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

    public Long getAmount() {
        return amount;
    }

    public void setAmount(Long amount) {
        this.amount = amount;
    }

    public ProductStatus getSaleStatus() {
        return saleStatus;
    }

    public void setSaleStatus(ProductStatus saleStatus) {
        this.saleStatus = saleStatus;
    }

    public String getSkuCode() {
        return skuCode;
    }

    public void setSkuCode(String skuCode) {
        this.skuCode = skuCode;
    }

    public String getSizeName() {
        return sizeName;
    }

    public void setSizeName(String sizeName) {
        this.sizeName = sizeName;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Long getStockNum() {
        return stockNum;
    }

    public void setStockNum(Long stockNum) {
        this.stockNum = stockNum;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getShortName() {
        return shortName;
    }

    public void setShortName(String shortName) {
        this.shortName = shortName;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }

    public Long getQuantity() {
        return quantity;
    }

    public void setQuantity(Long quantity) {
        this.quantity = quantity;
    }

    public PromotionType getSalesType() {
        return salesType;
    }

    public void setSalesType(PromotionType salesType) {
        this.salesType = salesType == null ? null : salesType;
    }

    @JsonFormat(pattern = "##.01")
    public BigDecimal getPromotionPrice() {
        return promotionPrice;
    }

    public void setPromotionPrice(BigDecimal promotionPrice) {
        this.promotionPrice = promotionPrice;
    }

    public Boolean getIsCheck() {
        return isCheck;
    }

    public void setIsCheck(Boolean isCheck) {
        this.isCheck = isCheck;
    }

    public BigDecimal getSalesPrice() {
        return salesPrice;
    }

    public void setSalesPrice(BigDecimal salesPrice) {
        this.salesPrice = salesPrice;
    }

    public String getImagePath() {
        return imagePath;
    }

    public void setImagePath(String imagePath) {
        this.imagePath = imagePath;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    public Date getPreSaleDate() {
        return preSaleDate;
    }

    public void setPreSaleDate(Date preSaleDate) {
        this.preSaleDate = preSaleDate;
    }

    public BigDecimal getPackVipPrice() {
        return packVipPrice;
    }

    public void setPackVipPrice(BigDecimal packVipPrice) {
        this.packVipPrice = packVipPrice;
    }

    @Override
    public YgShoppingCarModel clone() {
        try {
            return (YgShoppingCarModel) super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return null;
    }

    public Long getBrandId() {
        return brandId;
    }

    public void setBrandId(Long brandId) {
        this.brandId = brandId;
    }

    @Override
    public String toString() {
        return "YgShoppingCarModel{" +
                "id=" + id +
                ", userId=" + userId +
                ", skuId=" + skuId +
                ", supplierId=" + supplierId +
                ", quantity=" + quantity +
                ", amount=" + amount +
                ", salesType=" + salesType +
                ", salesPrice=" + salesPrice +
                ", promotionPrice=" + promotionPrice +
                ", isCheck=" + isCheck +
                ", stockNum=" + stockNum +
                ", productId=" + productId +
                ", newCustomPrice=" + newCustomPrice +
                ", unitName='" + unitName + '\'' +
                ", productName='" + productName + '\'' +
                ", shortName='" + shortName + '\'' +
                ", sizeName='" + sizeName + '\'' +
                ", imagePath='" + imagePath + '\'' +
                ", createTime=" + createTime +
                ", skuCode='" + skuCode + '\'' +
                ", skuStatus=" + skuStatus +
                ", saleStatus=" + saleStatus +
                ", preSaleDate=" + preSaleDate +
                ", packId=" + packId +
                ", packTitle='" + packTitle + '\'' +
                ", packPrice=" + packPrice +
                ", packVipPrice=" + packVipPrice +
                ", vipPrice=" + vipPrice +
                ", productAmount=" + productAmount +
                ", cumulative=" + cumulative +
                ", useCoupon=" + useCoupon +
                ", isSpecial=" + isSpecial +
                ", realSalesPrice=" + realSalesPrice +
                ", shareRate=" + shareRate +
                ", foreverRate=" + foreverRate +
                '}';
    }
}